﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Ipepper.EnvioEmail.Negocio;

namespace Ipepper.EnvioEmail.Web
{
    public partial class EmailAdm : Mdp.Framework.Componentes.Page
    {
        Object objEmail;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(Request.QueryString["id"]))
            {
                if (Request.QueryString["id"] != "0")
                {
                    this.Editar();
                }
                else
                {
                    //this.Novo();
                }
            }
        }

        protected void Page_Init(object sender, EventArgs e)
        {
            objEmail = new Email("ConnectionString");
            this.PropriedadeChave = "idEmail";
            this.CarregarObjetoBase(objEmail, !Page.IsPostBack);
            
        }
    }
}
